﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Ovvio.Web.Core;
using Ovvio.Data;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Web.Mvc;

namespace Ovvio.Web.Areas.Admin.Models
{
    public class ItemTypeModel : BaseModel<ItemType>
    {
        [ScaffoldColumn(false)]
        public int Id { get { return Entity.Id; } set { Entity.Id = value; } }

        [Required]
        [DisplayName("Type")]
        public string Value { get { return Entity.Type; } set { Entity.Type = value; } }

        [Required]
        public string Description { get { return Entity.Description; } set { Entity.Description = value; } }

        public static List<ItemTypeModel> ItemTypes
        {
            get
            {
                return CreateList<ItemTypeModel, ItemType, OvvioDataContext>();
            }
        }

    }
}
